package org.gten.gegedexin.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.time.LocalDateTime;

@Service
public class DeleteMail {
    @Autowired
    MailInfoServiceImpl mailInfoServicel;
    public void delmail(String mailID){
        mailInfoServicel.setDel(Integer.parseInt(mailID));
        mailInfoServicel.setDelDate(Integer.parseInt(mailID), LocalDateTime.now());
    }

    public void restoreMail(String mailID){
        mailInfoServicel.setRead(Integer.parseInt(mailID));
    }
}
